<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType = "text/html; charset=UTF-8" pageEncoding="utf-8" %>
<%@ include file="/common/init.jsp"%>
<html>
<head>
<title>澳斯浪廷会员平台</title>
<link href="<c:url value='/resources/css/css.css'/>" type="text/css" rel="stylesheet"/>
<script type="text/javascript" src="<c:url value='/resources/js/jquery-1.7.2.min.js'/>"></script>
<script type="text/javascript" src="<c:url value='/resources/js/validate.js'/>"></script>
<script type="text/javascript">
//登录非空验证
function checkMsg() {
	title = document.getElementById("title");
	msg = document.getElementById("msgContent");
	if (title.value.length == 0) {
		alert("邮件标题不能为空");
		title.focus();
		return false;
	}else if (msg.value.length == 0) {
		alert("邮件内容不能为空");
		msg.focus();
		return false;
	}
	return true;
}
function doSave(){
	$.ajaxSetup({cache:false});
	var checkFlg = true;
	checkFlg = checkFlg && validateEmpty_jquery("标题", "title");
	checkFlg = checkFlg && validateEmpty_jquery("内容", "msgContent");
	if ( !checkFlg ) return false;
    if (checkFlg) {
    	//var data = $("#othermember").formSerialize();
    	document.forms[0].action = "${ctx}/savemail.action";
        document.forms[0].submit();
    }
}
</script>
</head>
<body leftmargin="0">
<div class="main">
<div class="width_l"><iframe src="menu.action" frameborder="0" width="250" height="100%" class="menu"></iframe></div>
    <div class="right">
    <div class="width_r">
        <div class="menu_r">
            <ul>
                <li><a href="index.action">首页</a></li>
                <li><a href="information.action">消息</a></li>
                <li><a href="notice.action">公告中心</a></li>
                <li><a href="news.action">新闻中心</a></li>
                <li><a href="inbox.action">收件箱</a></li>
                <li><a href="tomail.action">写邮件</a></li>
                <li><a href="sent.action">已发送</a></li> 
                <li><a href="${ctx}/exit.action">安全退出</a></li> 
            </ul>
        </div>
        <div class="news_top"><img src="<c:url value='/resources/images/top.jpg'/>" /></div>
        <form id="sendMail" name="sendMail" action="send.action" method="post" onsubmit="return checkMsg();">
        <div class="news">
            <h4>写邮件</h4>
            <div class="write">类型：
            	<select name="msg.type" id="msgType">
	              <c:forEach var="msg" items="${mailList}">
	              	<option value="${msg.code}">${msg.name}</option>
				  </c:forEach>
	            </select>
            </div>
            <div class="write">主题：
            	<input name="msg.title" id="title" type="text" class="text" size="30" value="${msg.title}"/>
            	<input type="hidden" name="msg.receiveId" value="${msg.sendId }"/>
            	<input type="hidden" name="msg.replyId" value="${msg.id }"/>
            </div>
          <table width="500" border="0" cellspacing="0" cellpadding="0" style="color:#676767; margin-left:200px;">
			  <tr>
			    <td width="44" valign="top">内容：</td>
			    <td width="456"><label for="textarea"></label>
			      <textarea name="msg.msg" id="msgContent" class="text_1" cols="50" rows="8"></textarea></td>
			  </tr>
		  </table>
          <div class="tijiao"><img src="<c:url value='/resources/images/tijiao.jpg'/>" onclick="doSave();"/></div>
        </div>
        </form>
        <div class="news_down"><img src="<c:url value='/resources/images/down.jpg'/>" /></div>
    </div>
    </div>
</div>

</body>
</html>